home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Prg / THRMDEMO.ZIP / THERM.FRM < prev    next >
Text File  |  1997-09-14  |  4KB  |  105 lines

  1. VERSION 2.00
  2. Begin Form Thermometer 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Progress Meter"
  6.    ClientHeight    =   3330
  7.    ClientLeft      =   2025
  8.    ClientTop       =   1365
  9.    ClientWidth     =   6465
  10.    ControlBox      =   0   'False
  11.    Height          =   3735
  12.    Left            =   1965
  13.    LinkTopic       =   "Thermometer"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    MousePointer    =   11  'Hourglass
  17.    ScaleHeight     =   3330
  18.    ScaleWidth      =   6465
  19.    Top             =   1020
  20.    Width           =   6585
  21.    Begin SSPanel Gauge 
  22.       FloodType       =   1  'Left To Right
  23.       FontBold        =   -1  'True
  24.       FontItalic      =   0   'False
  25.       FontName        =   "MS Sans Serif"
  26.       FontSize        =   9.75
  27.       FontStrikethru  =   0   'False
  28.       FontUnderline   =   0   'False
  29.       Height          =   510
  30.       Left            =   705
  31.       TabIndex        =   0
  32.       Top             =   1755
  33.       Width           =   5100
  34.    End
  35.    Begin Label txt_message 
  36.       Alignment       =   2  'Center
  37.       BackStyle       =   0  'Transparent
  38.       Caption         =   "Please Wait..."
  39.       FontBold        =   -1  'True
  40.       FontItalic      =   0   'False
  41.       FontName        =   "MS Sans Serif"
  42.       FontSize        =   9.75
  43.       FontStrikethru  =   0   'False
  44.       FontUnderline   =   0   'False
  45.       Height          =   1095
  46.       Left            =   345
  47.       TabIndex        =   1
  48.       Top             =   225
  49.       Width           =   5775
  50.    End
  51. End
  52. '*******************************************************
  53. '*                                                     *
  54. '*      File Name: Therm.FRM                           *
  55. '*                                                     *
  56. '*        Created: 12/22/94     By: RDV                *
  57. '*                                                     *
  58. '* Comments: Displays a progress thermometer.          *
  59. '*           See Therm.BAS for interface.              *
  60. '*                                                     *
  61. '*******************************************************
  62. Option Explicit
  63.  
  64. Const GWL_STYLE = (-16)
  65. Const WS_DISABLED = &H8000000
  66. Const MOUSE_HOURGLASS = 11
  67. Const MOUSE_DEFAULT = 0
  68.  
  69. Option Base 1
  70. Dim a_disabledForms() As Long
  71. Dim i_disabledCount As Long
  72.  
  73. Declare Function GetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
  74. Declare Function SetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As Long) As Long
  75.  
  76. Sub Form_Load ()
  77.     Dim l_winStyle As Long
  78.     Dim i As Integer
  79.     screen.MousePointer = MOUSE_HOURGLASS
  80.     i_disabledCount = 0
  81.     For i = 0 To Forms.Count - 1
  82.         l_winStyle = GetWindowLong(Forms(i).hWnd, GWL_STYLE)
  83.         If l_winStyle And Not WS_DISABLED And Forms(i).hWnd <> Me.hWnd Then
  84.             l_winStyle = SetWindowLong(Forms(i).hWnd, GWL_STYLE, l_winStyle Or WS_DISABLED)
  85.             i_disabledCount = i_disabledCount + 1
  86.             ReDim Preserve a_disabledForms(i_disabledCount) As Long
  87.             a_disabledForms(i_disabledCount) = Forms(i).hWnd
  88.         End If
  89.     Next i
  90. End Sub
  91.  
  92. Sub Form_Unload (Cancel As Integer)
  93.     Dim l_winStyle As Long
  94.     Dim l_winStyle2 As Long
  95.     Dim i As Integer
  96.     
  97.     For i = 1 To i_disabledCount
  98.         l_winStyle = GetWindowLong(a_disabledForms(i), GWL_STYLE)
  99.         l_winStyle2 = SetWindowLong(a_disabledForms(i), GWL_STYLE, l_winStyle And Not WS_DISABLED)
  100.         l_winStyle2 = GetWindowLong(a_disabledForms(i), GWL_STYLE)
  101.     Next i
  102.     screen.MousePointer = MOUSE_DEFAULT
  103. End Sub
  104.  
  105.